package com.oxygen.pt.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 氧舱每月巡检记录表
 * 对应表：chamber_inspection_monthly
 */
@Data
@TableName("chamber_inspection_monthly")
public class ChamberInspectionMonthly implements Serializable {

    /** 主键ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 氧舱号 */
    private Long chamberId;

    /** 巡检年份 */
    private Integer inspectYear;

    /** 巡检月份 */
    private Integer inspectMonth;

    /** 巡检人 */
    private String inspector;

    /* ---------- 设备状态（0=正常 1=异常 2=待检修） ---------- */
    private Integer upsStatus;  //UPS 电源状态
    private Integer observationWindowStatus;
    private Integer pressureVesselStatus;
    private Integer electricalSystemStatus;
    private Integer chamberDeviceStatus;
    private Integer pressurePipeStatus;
    private Integer emergencyDecompressStatus;
    private Integer fireSprinklerStatus;
    private Integer waterTankStatus;
    private Integer airCompressorStatus;
    private Integer negativePumpStatus;
    private Integer containerWorkStatus;

    /* ---------- 备注 ---------- */
    /** 备注信息（JSON字符串） */
    private String remarksJson;

    /** 是否无备注（数据库生成，实体不持久化）
     * if (entity.getIsJsonEmpty()) 来获取是否为空 */
    @TableField(exist = false)
    private transient Boolean isJsonEmpty;

    /* ---------- 时间戳 ---------- */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}